
import httpRequest from '@/utils/httpRequest'
import constant from '../constant'

export function pageData(data) {
  return httpRequest({
    url: constant.DR + '/rule/groupInfo/page',
    method: 'post',
    data: data
  })
}
// 判断
export function listGroupData(data) {
  return httpRequest({
    url: constant.DR + '/rule/version/manage/findGroupIdentify',
    method: 'post',
    data: data
  })
}
export function updateData(data) {
  return httpRequest({
    url: constant.DR + '/rule/groupInfo/update',
    method: 'post',
    data: data
  })
}
// 普通规则表保存
export function saveData(data) {
  return httpRequest({
    url: constant.DR + '/rule/groupInfo/save',
    method: 'post',
    data: data
  })
}
export function getData(data) {
  return httpRequest({
    url: constant.DR + '/rule/groupInfo/get',
    method: 'post',
    data: data
  })
}
export function showTemplate(data) {
  return httpRequest({
    url: constant.DR + '/rule/groupInfo/showTemplate',
    method: 'post',
    data: data
  })
}
export function listGroupInfosByEntity(data) {
  return httpRequest({
    url: constant.DR + '/rule/groupInfo/listGroupInfosByEntity',
    method: 'post',
    data: data
  })
}
export function gettaskList(data) {
  return httpRequest({
    url: constant.DR + '/rule/version/task/taskList',
    method: 'post',
    data: data
  })
}
// 决策表保存
export function saveRuleGroup(data) {
  return httpRequest({
    url: constant.DR + '/rule/groupInfo/saveRuleGroup',
    method: 'post',
    data: data
  })
}

// 修改生产版本
export function copyPublishUpdate(data) {
  return httpRequest({
    url: constant.DR + '/rule/groupInfo/copyPublishUpdate',
    method: 'post',
    data: data
  })
}
/**
 * @description: 险种规则定义
 * @param {*}{"riskCode":"","fullName":"","itemCode":"","itemType":"","pageNumber":1,"pageSize":10}
 * @return {*data}
 */
 export function ruleRiskInfo(data) {
  return httpRequest({
    url: constant.DR + '/rule/ruleRiskInfo/page',
    method: 'post',
    data: data
  })
}
/**
 * @description: 根据规则组代码查询基础的决策表头信息
 * @param {"groupIdentify":"G00147","conditionDesc":""}
 * @return {*}
 */
 export function baseHeder(data) {
  return httpRequest({
    url: constant.DR + '/rule/ruleRiskInfo/baseHeder',
    method: 'post',
    data: data
  })
}
/**
 * @description: 根据规则组代码查询基础的决策表头信息
 * @param {"groupIdentify":"G00147","conditionDesc":""}
 * @return {*}
 */
 export function getByTaskHeder(data) {
  return httpRequest({
    url: constant.DR + '/rule/ruleRiskInfo/getByTaskHeder',
    method: 'post',
    data: data
  })
}
/**
 * @description: 复制险种规则信息
 * @param {*}
 * @return {*}
 */
 export function copyRiskRuleInfo(data) {
  return httpRequest({
    url: constant.DR + '/rule/ruleRiskInfo/copyRiskRuleInfo',
    method: 'post',
    data: data
  })
}
/**
 * @description: 险种列表信息查询
 * @param {*}
 * @return {*}
 */
 export function riskList(data) {
  return httpRequest({
    url: constant.DR + '/rule/ruleRiskInfo/riskList',
    method: 'post',
    data: data
  })
}
/**
 * @description: 险种规则配置样式回显查询
 * @param {*}
 * @return {*}
 */ 
 export function checkRuleGroup(data) {
  return httpRequest({
    url: constant.DR + '/rule/ruleRiskInfo/checkRuleGroup',
    method: 'post',
    data: data
  }) 
}
// 确认配置完成状态更新
export function updateComplete(data) {
  return httpRequest({
    url: constant.DR + '/rule/ruleRiskInfo/updateComplete',
    method: 'post',
    data: data
  }) 
}
// 保存接口
export function saveRiskRule(data) {
  return httpRequest({
    url: constant.DR + '/rule/ruleRiskInfo/saveRiskRule',
    method: 'post',
    data: data
  }) 
}